package com.ruoyi.fee.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fee.mapper.WStackTransferFeeRuleMapper;
import com.ruoyi.fee.domain.WStackTransferFeeRule;
import com.ruoyi.fee.service.IWStackTransferFeeRuleService;

/**
 * 倒垛费Service业务层处理
 * 
 * @author wzy
 * @date 2024-08-30 11:57:04
 */
@Service
public class WStackTransferFeeRuleServiceImpl implements IWStackTransferFeeRuleService 
{
    @Autowired
    private WStackTransferFeeRuleMapper wStackTransferFeeRuleMapper;

    /**
     * 查询倒垛费
     * 
     * @param stackTransferFeeId 倒垛费主键
     * @return 倒垛费
     */
    @Override
    public WStackTransferFeeRule selectWStackTransferFeeRuleByStackTransferFeeId(Long stackTransferFeeId)
    {
        return wStackTransferFeeRuleMapper.selectWStackTransferFeeRuleByStackTransferFeeId(stackTransferFeeId);
    }

    /**
     * 查询倒垛费列表
     * 
     * @param wStackTransferFeeRule 倒垛费
     * @return 倒垛费
     */
    @Override
    public List<WStackTransferFeeRule> selectWStackTransferFeeRuleList(WStackTransferFeeRule wStackTransferFeeRule)
    {
        return wStackTransferFeeRuleMapper.selectWStackTransferFeeRuleList(wStackTransferFeeRule);
    }

    /**
     * 新增倒垛费
     * 
     * @param wStackTransferFeeRule 倒垛费
     * @return 结果
     */
    @Override
    public int insertWStackTransferFeeRule(WStackTransferFeeRule wStackTransferFeeRule)
    {
        wStackTransferFeeRule.setCreateTime(DateUtils.getNowDate());
        return wStackTransferFeeRuleMapper.insertWStackTransferFeeRule(wStackTransferFeeRule);
    }

    /**
     * 修改倒垛费
     * 
     * @param wStackTransferFeeRule 倒垛费
     * @return 结果
     */
    @Override
    public int updateWStackTransferFeeRule(WStackTransferFeeRule wStackTransferFeeRule)
    {
        wStackTransferFeeRule.setUpdateTime(DateUtils.getNowDate());
        return wStackTransferFeeRuleMapper.updateWStackTransferFeeRule(wStackTransferFeeRule);
    }

    /**
     * 批量删除倒垛费
     * 
     * @param stackTransferFeeIds 需要删除的倒垛费主键
     * @return 结果
     */
    @Override
    public int deleteWStackTransferFeeRuleByStackTransferFeeIds(Long[] stackTransferFeeIds)
    {
        return wStackTransferFeeRuleMapper.deleteWStackTransferFeeRuleByStackTransferFeeIds(stackTransferFeeIds);
    }

    /**
     * 删除倒垛费信息
     * 
     * @param stackTransferFeeId 倒垛费主键
     * @return 结果
     */
    @Override
    public int deleteWStackTransferFeeRuleByStackTransferFeeId(Long stackTransferFeeId)
    {
        return wStackTransferFeeRuleMapper.deleteWStackTransferFeeRuleByStackTransferFeeId(stackTransferFeeId);
    }
}
